//
//  TTNotificationHandler.m
//  PPDL
//
//  Created by 王洋 on 2019/8/14.
//  Copyright © 2019 王洋. All rights reserved.
//

#import "TTToastManager.h"
#import "TTNotificationHandler.h"

@implementation TTNotificationHandler

+ (instancetype)sharedInstance {
    
    static  dispatch_once_t queue;
    static TTNotificationHandler * notificationHandler = nil;
    dispatch_once(&queue, ^{
        notificationHandler = [[self alloc] init];
    });
    return notificationHandler;
}

#pragma mark 展示
- (void)showRemoteNotificationWithDict:(NSDictionary *)notificationsDict {
    
    TTNotificationActionModel *model = [[TTNotificationActionModel alloc] init];
    model.title = @"聊天信息";
    model.content = @"666666666666666666666666666666666666666666666666666666";
    model.jumpModel = [[PP_jumpModel alloc] init];
    model.jumpModel.type = CommentClickType_HtmlPage;
    model.jumpModel.ID = @"https://www.baidu.com";
    [TTToastManager showNotificationToastWithModel:model actionHandle:^(PP_jumpModel * _Nonnull model) {
        
//        [self alert:@"点击了推送"];
    }];
}

#pragma mark 处理点击事件
- (void)clickRemoteNotificationWithModel:(PP_jumpModel *)model {

    [[TTJumpManager share] pushViewControllerWithModel:model];
}


@end
